﻿using UnityEngine;
using System.Collections;

public class EliminatedText : MonoBehaviour {

	private float time;
	public static bool textEnabled;
	public GameObject eliminatedText;

	// Use this for initialization
	void Start () {
		time = 3f;
		textEnabled = false;
	}
	
	// Update is called once per frame
	void Update () {
		if(textEnabled) {
			//ustawienie widoczności napisu
			eliminatedText.SetActive(true);
			time -= Time.deltaTime;
			if(time<0f)
			{
				//reset czasu
				time = 3f;
				//reset flagi
				textEnabled = false;
				//widoczność na false
				eliminatedText.SetActive(false);
			}
		}
	}
}
